import request from '../utils/request'

export function getPageOrder(pageNum, pageSize, searchObj) {
    return request({
        url: `order/${pageNum}/${pageSize}`,
        method: 'get',
        params: searchObj
    })
}

export function getOrderById(orderId) {
    return request({
        url: `order/${orderId}`,
        method: 'get'
    })
}

export function closeOrder(orderId) {
    return request({
        url: `order/close/${orderId}`,
        method: 'put'
    })
}

export function delivery(data) {
    return request({
        url: `order/delivery`,
        method: 'put',
        data: data
    })
}
